import React from 'react';
import Bread from '../../component/TableContent/VipBread';
import { Breadcrumb, Input } from 'antd';
import axios from '../../utils/http';
import TableContent from '../../component/TableContent/TableContent'
//签到日志
class SignLog extends React.Component {
  constructor() {
    super()
    this.state = {
      nick: '',
      tableData:[]
    }
  }
  qiehuan = () => {
    this.props.history.push('/Home/huiYuan/SignManage')
  }
  qiehuan1 = () => {
    this.props.history.push('/Home/huiYuan/SignLog')
  }
  getnick = e => {
    this.setState({
      nick:e.target.value
    })
  }
  search = () => {
    axios({
      url: '/member/queryCilByNn',
      method: 'get',
      params: {
        Nn:this.state.nick
      }
    }).then(data => {
      console.log(data)
      this.setState({
        tableData:data.data.data
      })
    })
  }
render(){
return (
  <div className='signmanage'>
    <Bread mianbao='签到管理'></Bread>
    <Breadcrumb>
      <Breadcrumb.Item onClick={this.qiehuan}>签到管理</Breadcrumb.Item>
      <Breadcrumb.Item onClick={this.qiehuan1}>签到日志</Breadcrumb.Item>
    </Breadcrumb>
    <div className='wrapper'>
      <div>
        昵称
        <Input style={{ width: '20rem', margin: '0 2rem' }} placeholder='请输入你要搜素的昵称' onChange
        ={this.getnick}></Input>
        <button className='surename' style={{padding:'5px 2rem'}} onClick={this.search}>搜索</button>
      </div>
      <TableContent whopage='SignLog' shuju={this.state.tableData}></TableContent>
      {/* <TableContent whopage='vipmanage'></TableContent> */}
    </div>
  </div> 
);
}
}
export default SignLog;